package com.carstop.model;

import java.util.List;

public class CountryService {
    
	private CountryDAO_interface dao;

	public CountryService() {
		dao = new CountryDAO();
	}

	public CountryVO addArea(String country_id, String name,String area_id) {

		CountryVO countryVO = new CountryVO();

		countryVO.setCountry_id(country_id);
		countryVO.setName(name);
		countryVO.setArea_id(area_id);
		dao.insert(countryVO);

		return countryVO;
	}

	public CountryVO updateEmp(String country_id, String name,String area_id) {

		CountryVO countryVO = new CountryVO();

		countryVO.setCountry_id(country_id);
		countryVO.setName(name);
		countryVO.setArea_id(area_id);
		dao.update(countryVO);

		return countryVO;
	}

	public void deleteEmp(String country_id) {
		dao.delete(country_id);
	}

	

	public List<CountryVO> getAll() {
		return dao.getAll();
	}
}
